import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [

  {
    path: '/',
    redirect: '/main',
    meta: { title: '首页', showInbreadcrumb: false }
  },

  {
    path: '/main',
    name:'main',
    component: () => import('@/views/main'),
    children: [
      {
        path: 'consultation',
        component: () => import('@/views/Consultation/examine')
      },
      {
        path:'consultationPass',
        component:()=>import('@/views/Consultation/examinePass')
      },
      {
        path:'initiaVisit',
        component :()=>import('@/views/InitiaVisit/examine')
      },
      {
        path:'initiaPass',
        component:()=>import('@/views/InitiaVisit/examinePass')
      },
      {
        path: 'admain',
        component: () => import('@/views/Admin/index.vue')
      }
      ,
      {
        path: 'stu',
        component: () => import('@/views/Student/index.vue')
      },
      {
        path:'workTime',
        component:()=>import('@/views/workTime')
      },
    ]
  },
  {
    path:'/before_main',
    component: () => import('@/views/before_main'),
    children: [
      {
        path: 'Personal',
        component: () => import('@/views/Personal/examine.vue')
      },
      {
        path: 'order',
        component: () => import('@/views/Order/examine.vue')
      },
      {
        path: 'Orderlist',
        component: () => import('@/views/MyInfo/index.vue')
      },
    ]

  },
  {
    path: '/stulogin',
    component: () => import('@/views/Login/StuLogin/index.vue')
  }
  ,
  {
    path: '/adminlogin',
    component: () => import('@/views/Login/AdminLogin/index.vue')
  },

]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
